package projectmanagement.models;

import java.util.Calendar;
import java.util.*;

/**
 * @author Valera Rusakov
 * This class used for creating the instance of Meeting.
 */
public class Meeting {

    private List<User> userList;
    private String meetingDescription = "N/A";
    private Calendar meetingStartTime;
    private Calendar meetingDuration;

    public Meeting(String meetingDescription, Calendar meetingStartTime, Calendar meetingDuration) {
        this.meetingDescription = meetingDescription;
        this.meetingStartTime = meetingStartTime;
        this.meetingDuration = meetingDuration;
        userList = new LinkedList<User>();
    }

    public void setMeetingDescription(String meetingDescription) {
        this.meetingDescription = meetingDescription;
    }

    public void setMeetingStartTime(Calendar meetingStartTime) {
        this.meetingStartTime = meetingStartTime;
    }

    public List<User> getUserList() {
        return userList;
    }

    @Override
    public String toString() {
        StringBuilder result = new StringBuilder();
        result.append("Description : ").append(meetingDescription).append("\n")
        .append("Start time : ").append(meetingStartTime).append("\n")
        .append("List of assigned users : ").append(userList.toString()).append("\n");
        return result.toString();
    }
}